package org.tema.ejb;

import java.sql.Date;
import java.util.Collection;

import org.tema.entities.Product;
import org.tema.entities.TestSpecification;
import org.tema.entities.User;

public interface TestSpecBeanLocal {

	
	public TestSpecification addTestSpec( String summary, String description, Date cDate, Date mDate, Product product, User currentUser); 
	public TestSpecification  updateTestSpec(TestSpecification testSpecification, User modifier);
	public TestSpecification undoTestSpecChanges(TestSpecification testSpecification);
	public void deleteTestSpec(TestSpecification testSpecification);
	public Collection <TestSpecification> findAllTestSpecs();
	
	//search methods
	public TestSpecification findTestSpecById( int id );
	public Collection <TestSpecification> findTestSpecByProductId( int productId );
	public Collection <TestSpecification> findTestSpecByProductName( String productName );
	public TestSpecification findTestSpecBySummary( String summary );
	public Collection <TestSpecification> findTestSpecsBySummary(String summary );
	public Collection <TestSpecification>  findTestSpecByCDate( Date date );
	public Collection <TestSpecification> findTestSpecByMDate( Date date );
	public Collection <TestSpecification> findTestSpecByCreatorId( int cId );
	public Collection <TestSpecification> findTestSpecByCreatorName( String cName );
	public Collection <TestSpecification> findTestSpecByModifierId( int cId );
	public Collection <TestSpecification> findTestSpecByModifierName( String cName );

	//for the searches of products where the users participates in, 
	//test cases, test plans and test design specifications he/she has created
	//use the getter/setter methods of the User class for the respective DB relationships.
}
